
<html>
<head>
<meta charset="UTF-8">
<title>表模型库所引用条目信息列表</title>
<link href="../../static/easyui/themes/bootstrap/easyui.css" rel="stylesheet" type="text/css"/>
<link href="../../static/easyui/themes/icon.css" rel="stylesheet" type="text/css"/>
<script src="../../static/easyui/jquery.min.js" type="text/javascript"></script>
<script src="../../static/easyui/jquery.easyui.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../static/easyui/locale/easyui-lang-zh_CN.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.util.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.jquery.ajax.js" type="text/javascript"></script>
<script src="../../static/plugin/assets/jslib.easyui.util.js" type="text/javascript"></script>
<script src="../../ffres/dict/all.js"></script>
<a href="" target="_blank" id="commonLink" name="commonLink"></a>
</head>
<script type="text/javascript">

	function doAdd(){
		JLEUtil.createModalWin('新增', 'DictItemInfoAdd.html');
	}
	
	function doUpdate() {
		var row = $('#dg').datagrid('getSelected');
		if (row){
			JLEUtil.createModalWin('修改数据条目', 'DictItemInfoUpdate.html?' + 'itemId=' + row.itemId);
		} else {
			$.messager.alert('提示','请选择一条记录！','info');
		}
	}
	
	function doDelete(){
		var row = $('#dg').datagrid('getSelected');
		if (row) {
			$.messager.confirm('删除提示', '你确定要删除这条数据条目记录?', function(r){
				if (r){
					var jsonData = JSON.parse('{'+'"itemId":"' + row.itemId + '"'+'}');
					$.restfulDelete('../../api/dict/item/info', jsonData, function(data) {
						$.messager.alert('提示','记录删除成功!','info');
						$('#dg').datagrid('reload');
					});
				}
			});
		} else {
			$.messager.alert('提示','请选择一条记录！','info');
		}
	}
	
	function doRefList() {
		var row = $('#dg').datagrid('getSelected');
		if (row) {
			JLEUtil.createModalWin('查看条目关联关系','DictItemInfoView.html?' + 'itemId=' + row.itemId);
		} else {
			$.messager.alert('提示','请选择数据条目！');
		}
	}

	function reloadList(){
		$('#dg').datagrid('reload');
		JLEUtil.closewin();
	};	
</script>
</head>
<body class="easyui-layout">
<div data-options="region:'north',title:''" style="height: 40px; background: #F4F4F4;">
	<form id="searchForm">
		<table>
			<tr>
				<td>&nbsp;条目代码：</td>
				<td><input name="itemCodeLike" id="itemCodeLike"/></td>
				<td>&nbsp;条目名称：</td>
				<td><input name="itemName" id="itemName"/></td>
				<td><a class="easyui-linkbutton" href="javascript:void(0);" onclick="JLEUtil.queryForm('searchForm','dg','../../api/my/dict/item/infos');">查找</a></td>
				<td><a class="easyui-linkbutton" href="javascript:void(0);" onclick="JLEUtil.clearForm('searchForm');">清空</a></td>
			</tr>
		</table>
	</form>
</div>
<div data-options="region:'center',split:false">
<table id="dg" class="easyui-datagrid" title="" style="width:100%;height:100%"
			data-options="singleSelect:true,collapsible:true,url:'../../api/my/dict/item/infos',method:'post'"
			toolbar="#tb"
		title="Load Data" 
		rownumbers="true" pagination="true" pageSize="20">
		<thead>
			<tr>
				<th data-options="field:'itemCode',resizable:true" width="15%">条目代码</th>
				<th data-options="field:'itemName',resizable:true" width="16%">条目名称</th>
				<th data-options="field:'itemDataType',resizable:true" width="11%" formatter="formatter_PUB_DATA_TYPE">数据类型</th>
				<th data-options="field:'itemDataLength',resizable:true" width="6%">数据长度</th>
				<th data-options="field:'itemDataPrecision',resizable:true" width="6%">数据精度</th>
				<th data-options="field:'dictCode',resizable:true" width="12%">数据选项代码</th>
				<th data-options="field:'createUser',resizable:true" width="8%">创建者</th>
				<th data-options="field:'createTime',resizable:true" width="13%">创建时间</th>
				<th data-options="field:'refCount',resizable:true" width="8%">被引用次数</th>
				<th data-options="field:'subjectId',resizable:true" width="10%">所属主题</th>
				<th data-options="field:'itemRemarks',resizable:true" width="18%">条目备注</th>
			</tr>
		</thead>
	</table>
</div>
<div id="tb" style="padding:1px">
	<div style="margin-bottom:2px">
		<a href="javascript:doAdd();" class="easyui-linkbutton" iconCls="icon-add" plain="true">创建条目</a>
		<a href="javascript:doUpdate();" class="easyui-linkbutton" iconCls="icon-edit" plain="true">修改条目</a>
		<a href="javascript:doDelete();" class="easyui-linkbutton" iconCls="icon-remove" plain="true">删除条目</a>
		<a href="javascript:doRefList();" class="easyui-linkbutton" iconCls="icon-man" plain="true">查看条目关联关系</a>
	</div>
</div>
</body>
</html>
